﻿using System;
using System.Collections.Generic;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Div : HtmlElement
	{
		public Div() : base(DivDescription.Instance) { }
		public Div(string text)
			: this()
		{
			if (text != null)
				AddText(text);
		}
	}
	public class DivDescription : HtmlElementDescription
	{
		public static readonly DivDescription Instance = new DivDescription();
		private DivDescription() : base("div") { }
		public override Type ControlType { get { return typeof(Div); } }
		public override bool IsFlowElement { get { return true; } }
		public override bool OnlyFlowContent { get { return true; } }
		public override IEnumerable<HtmlElementDescription> PermittedElements { get { yield return StyleDescription.Instance; } }
		public override string Description { get { return "generic container for flow content that by itself does not represent anything."; } }
	}
}
